//
//  DPPictureSelectorCollectionView.m
//  DailyPhoto
//
//  Created by 黄凯展 on 16/7/25.
//  Copyright © 2016年 ShengCheng. All rights reserved.
//

#import "DPPictureSelectorCollectionView.h"
#import "DPPictureSelectorLayout.h"
#import "DPPictureSelectorCell.h"
#import "DPPictureSelectorHeaderView.h"
@implementation DPPictureSelectorCollectionView

+ (instancetype)collectionView
{
    DPPictureSelectorLayout *flowLayout = [[DPPictureSelectorLayout alloc] init];
    DPPictureSelectorCollectionView *collectionView = [[self alloc] initWithFrame:CGRectZero collectionViewLayout:flowLayout];
    collectionView.translatesAutoresizingMaskIntoConstraints = NO;
    [collectionView registerClass:[DPPictureSelectorCell class] forCellWithReuseIdentifier:NSStringFromClass([DPPictureSelectorCell class])];
    [collectionView registerClass:[DPPictureSelectorHeaderView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"DPPictureSelectorHeaderView"];
    collectionView.backgroundColor = [UIColor whiteColor];
    return collectionView;
}
@end
